//
//  WeatherView.m
//  Quick_News
//
//  Created by HCG on 15/1/30.
//  Copyright (c) 2015年 zkj. All rights reserved.
//

#import "WeatherView.h"

@implementation WeatherView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
 
- (void)dealloc
{
    [_weatherLabel release];
    [_weatherPhoto release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame//改成CGRect
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.weatherPhoto = [[UIImageView alloc]initWithFrame:CGRectMake(50, 0, self.frame.size.width / 2+20, self.frame.size.height)];
        [self addSubview:_weatherPhoto];
        [_weatherPhoto release];
        
        
        self.weatherLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.frame.size.width / 2 + 100, 0, self.frame.size.width, self.frame.size.height)];
        self.weatherLabel.textColor = [UIColor whiteColor];
        self.weatherLabel.font = [UIFont boldSystemFontOfSize:20];
        [self addSubview:_weatherLabel];
        [_weatherLabel release];
        
        
            }
    return self;
}
    

@end
